<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %>  
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<html>
<head>
  <title>选择行业</title>
  <script src="${ctx}/static/helper/select-industry-modal.js" type="text/javascript"></script>
  <style type="text/css">
    #select_industry_modal {
      width: 800px;
      margin-left: -400px;
    }
    #select_industry_modal .modal-body {
      max-height: 520px;
    }
  </style>
  <script>
  </script>
</head>
<body>
  <div class="modal-header">
    <div class="row">
      <div class="span4"><strong>请选择行业类别（您最多能选择<span>2</span>项）</strong></div>
      <div class="pull-right">
        <a href="#" class="btn btn-primary" id="select_industry_modal_ok">确定</a>
        <a href="#" class="btn btn-primary" data-dismiss="modal">取消</a>
      </div>
    </div>
    <div class="row">
      <div class="span2">已选行业：</div>
      <div class="span7" id="select_industry_modal_selected"></div>
    </div>
  </div><!--Modal header-->
  <div class="modal-body">
    <table class="table table-striped table-condensed" id="select_industry_modal_options">
      <tbody>
        <c:forEach items="${allIndustries}" var="industry">
        <tr valign="middle">
          <td class="span2"><strong>${industry.name}</strong></td>
          <td class="span7">&nbsp;
            <c:forEach items="${industry.subIndustries}" var="subIndustry">
            <label class="checkbox inline" id="select_industry_modal_option_${subIndustry.id}">
              <input type="checkbox" value="${subIndustry.id}"> ${subIndustry.name}
            </label>
            </c:forEach>
          </td>
        </tr>
        </c:forEach>
      </tbody>
    </table>
  </div><!--Modal body-->
</body>
</html>